﻿using System;
using DataObject;
using DataObject.Category;

namespace KMT.Controls.Article
{
    public partial class FooterArticle : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ListFixCategory();
        }

        private void ListFixCategory()
        {
            var lstCategory = CategoryController.Category_GetListByType_ListId((int)CategoryType.Article,
                                        Constants.Category_FieldList, Constants.GetStringFromWebConfig("CategoryFooterArticle"));
            if (lstCategory != null && lstCategory.Rows.Count > 0)
            {
                rptCategory.DataSource = lstCategory;
                rptCategory.DataBind();
            }
        }
    }
}